<!--接送信息-->
<template>
	<view class="order-pick-up">
		<card title="接送信息"> 
			<view class="content">
				<basic-label-value label="航班号" v-if="orderInfo.fltNo" :value="orderInfo.fltNo" notColon labelWidth="200rpx" color="#999999" size="28rpx" valueColor="#333333" />
				<basic-label-value label="上车地点" v-if="orderInfo.startOffLocation" :value="orderInfo.startOffLocation" notColon labelWidth="200rpx" color="#999999" size="28rpx" valueColor="#333333" />
				<basic-label-value label="下车地点" v-if="orderInfo.getToLocation" :value="orderInfo.getToLocation" notColon labelWidth="200rpx" color="#999999" size="28rpx" valueColor="#333333" />
				<basic-label-value label="航站楼" v-if="orderInfo.terminal" :value="orderInfo.terminal" notColon labelWidth="200rpx" color="#999999" size="28rpx" valueColor="#333333" />
				<basic-label-value label="航班抵达时间" v-if="orderInfo.fltArrivalTime" :value="orderInfo.fltArrivalTime" notColon labelWidth="200rpx" color="#999999" size="28rpx" valueColor="#333333" />
				<basic-label-value label="航班起飞时间" v-if="orderInfo.fltDepartureTime" :value="orderInfo.fltDepartureTime" notColon labelWidth="200rpx" color="#999999" size="28rpx" valueColor="#333333" />
				<basic-label-value label="用车时间" v-if="renderTime(orderInfo.startHour,orderInfo.startMinute) !== '-'" :value="renderTime(orderInfo.startHour,orderInfo.startMinute)" notColon labelWidth="200rpx" color="#999999" size="28rpx" valueColor="#333333" />
				<basic-label-value label="预约时间" v-if="renderTime(orderInfo.appointmentHour,orderInfo.appointmentMinute) !== '-'" :value="renderTime(orderInfo.appointmentHour,orderInfo.appointmentMinute)" notColon labelWidth="200rpx" color="#999999" size="28rpx" valueColor="#333333" />
				<basic-label-value label="出行人数" v-if="orderInfo.passengerCount" :value="orderInfo.passengerCount" notColon labelWidth="200rpx" color="#999999" size="28rpx" valueColor="#333333" />
				<basic-label-value label="行李数" v-if="orderInfo.luggageCount" :value="orderInfo.luggageCount" notColon labelWidth="200rpx" color="#999999" size="28rpx" valueColor="#333333" />
				<basic-label-value label="返程出发城市" v-if="orderInfo.returnOutboundCity && orderInfo.returnOutboundCity.name" :value="orderInfo.returnOutboundCity.name" notColon labelWidth="200rpx" color="#999999" size="28rpx" valueColor="#333333" />
				<basic-label-value label="备选日期" v-if="orderInfo.alternateDate" :value="orderInfo.alternateDate" notColon labelWidth="200rpx" color="#999999" size="28rpx" valueColor="#333333" />
				<basic-label-value label="备选时间" v-if="orderInfo.alternateTime" :value="orderInfo.alternateTime" notColon labelWidth="200rpx" color="#999999" size="28rpx" valueColor="#333333" />
			</view>
		</card>
	</view>
</template>
<script>
import card from '../../../components/card'
// import basic-label-value from '../../../components/label-value'
export default {
	name: 'order-pick-up',
	components: { card },
	props: {
		orderInfo : { type: Object, default:()=>{return null} }
	},
	methods: {		
		renderTime(hour, minute) {
			if (hour === -1 && minute === -1) {
			return '-'
			}
			const prefixZero = (num, n) => {
			return (Array(n).join(0) + num).slice(-n);
			}
			return `${prefixZero(hour, 2)}:${prefixZero(minute, 2)}`
		},
	},
}
</script>
<style lang="less">

</style>